<%- Loader('/public/stylesheets/pics.min.css')
.css('/public/stylesheets/pics.less')
.done(assets, config.site_static_host, config.mini_assets)
%>
<div id="content_pic">
    <div class="panel" style="-webkit-box-shadow: none;box-shadow: none;">
        <div id="pic_list" class="grid">
            <div class="grid-sizer"></div>
            <!-- DONE(hhdem) 用户信息显示的样式调整, 参考花瓣网 -->
            <div id="loginDiv" class="grid-item grid-item-nb">
                <div id="Profile">
                <% if (typeof(user) !== 'undefined' || current_user) { %>
                    <!-- DONE (hhdem) 用户统计信息获取 -->
                    <!-- TODO (hhdem) 点击统计信息进入用户面板页面 -->
                    <div class="profile-basic">
                        <a href="/user/<%= current_user.loginname %>" title="<%= current_user.loginname %>" class="img x loaded">
                            <img width="54" height="54" src="<%= current_user.avatar_url %>" data-baiduimageplus-ignore="1"></a>
                        <a href="/user/<%= current_user.loginname %>" class="userlink">hhdem</a>
                        <a href="/user/<%= current_user.loginname %>" title="帐号设置" class="settings"></a>
                    </div>
                    <div class="profile-stats">
                        <a href="/user/<%= current_user.loginname %>/get"><strong><%= current_user.image_count + current_user.get_image_count %></strong>图片</a>
                        <a href="/user/<%= current_user.loginname %>/board" class="middle"><strong><%= current_user.board_count %></strong>画板</a>
                        <a href="/user/<%= current_user.loginname %>/score"><strong><%= current_user.score %></strong>积分</a>
                    </div>
                    <div class="profile-acts convo">
                        <div class="links">
                            <a href="/topic/create" class="btn"><strong>
                            发布话题</strong><span></span></a>

                            <a id='create_pic_btn' data-toggle="modal" data-target="#image_upload" class="btn wbtn"><strong>
                                发布图片</strong><span></span></a>
                        </div>
                    </div>
                <% } else { %>
                    <div class="profile-basic">
                        <p style="line-height: 50px;"><%= config.description %></p>
                    </div>
                    <div class="profile-acts convo">
                        <div class="links">
                            <a href="#" class="btn" data-toggle="modal" data-target="#signin_modal"><strong>
                                登录</strong><span></span></a>
                            <a href="/signup" class="btn wbtn"><strong>
                                注册</strong><span></span></a>
                        </div>
                    </div>
                    <div class="attribution" style="padding: 20px 25px;">
                        <a href="/auth/github" class="btn wbtn" style="float: left;"><strong>
                            GitHub</strong><span></span></a>
                        <div class="buttons small " >
                            <!--TODO Signin with wechat and QQ account-->
                            <a href="/auth/wechat" title="微信帐号登录" rel="nofollow" class="wechat" target="_blank"></a>
                            <a href="/auth/qzone" title="QQ帐号登录" rel="nofollow" class="qzone"></a>
                        </div>
                    </div>
                <% } %>
                </div>
            </div>
        </div>
        <div id="pic-page-marker"></div>
    </div>
</div>
<div id="content_text">
    <div class="panel">
        <div class="header">
            <!-- TODO Tab页切换修改为ajax请求-->
            <% [['all', '全部'], ['good', '精华']].concat(tabs).forEach(function (pair) {
            var value = pair[0];
            var text = pair[1]; %>
            <a href="<%= value ? '/?tab=' + value : '/' %>"
               class="topic-tab <%= value === tab ? 'current-tab' : '' %>"><%= text %></a>
            <% }) %>
        </div>
        <% if (typeof(topics) !== 'undefined' && topics.length > 0) { %>
        <div class="innerTopic no-padding no-margin">
            <%- partial('topic/list', {
            topics: topics,
            pages: pages,
            current_page: current_page,
            base: '/',
            config: picConfig
            }) %>
        </div>
        <% } else { %>
        <div class="innerTopic">
            <p>无话题</p>
        </div>
        <% } %>
    </div>
</div>
<% if (picConfig.lazyload) { %>
<%- partial('topic/_pic_list', {
topics: topics,
pages: pages,
current_page: current_page,
base: '/',
config: picConfig
}) %>
<% } %>

